package Exams.MeituanPack.q2021.q04_CV;

import java.util.Scanner;

public class Main {
    static int len;
    static int[] A;
    static int[] B;
    // static LinkedList<Integer> stack = new LinkedList<Integer>();
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        len = sc.nextInt();
        A = new int[len + 1];
        B = new int[len + 1];
        for (int i = 1; i <= len; i++) {
            A[i] = sc.nextInt();
            B[i] = -1;
        }

        int times = sc.nextInt();
        for (int i = 0; i < times; i++) {
            int mode = sc.nextInt();
            if(mode == 1){
                int k = sc.nextInt();
                int index_a = sc.nextInt();
                int index_b = sc.nextInt();
                for (int j = 0; j < k && index_b < B.length; j++) {
                    B[index_b] = A[index_a];
                    index_b++;
                    // System.out.println(stack);
                    index_a++;
                }
//                for (int l = 0; l < k && index_b < B.length; l++) {
//                    B[index_b] = stack.pop();
//                    // System.out.println(Arrays.toString(B));
//                    index_b++;
//                }

            }else {
                int index = sc.nextInt();
                System.out.println(B[index]);
            }
        }
        sc.close();
    }
}
